import utils


class WriteTxt:

    def __init__(self, pen):
        self.pen = pen
        self.pen.hideturtle()
        utils.Utils.penMove(self.pen, -utils.width//2 + 20, utils.height//5)

    def __enter__(self):
        return self

    def __exit__(self, exp_type, exp_value, exp_traceback):
        del self

    def writeTxt(self):
        txt = utils.Utils.readFile("love")
        self.pen.write(txt, font=("Arial", 10, "normal"))
